import babel from 'rollup-plugin-babel'
import commonjs from '@rollup/plugin-commonjs'
import resolve from '@rollup/plugin-node-resolve'
import typescript from '@rollup/plugin-typescript'

export default {
  input: "./components/index.ts",
  output: {
    file: "lib/bundle.cjs.js",
    format: "cjs",
    name: "bundle",
    sourcemap: true,
    exports: "named"
  },
  plugins: [
    typescript(),
    resolve(),
    commonjs(),
    babel({
      exclude: 'node_modules/**'
    })
  ],
  external: ['react']
}
